package com.puzzlebazar.client.puzzle.model;

public abstract class MoveImpl implements Move {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3572373752370848651L;
	
	
	public static final long NO_TIME = -99999999;
	protected long time;

	/**
	 * Only for serialization
	 */
	protected MoveImpl() {
		time = NO_TIME;
	}
	
	/**
	 * Creates a new move
	 * 
	 * @param time The initial time to set for this move
	 */
	public MoveImpl( long time ) {
		this.time = time;
	}
	
	@Override
	public void accept(MoveVisitor visitor) throws Exception {
		visitor.visitMove( this );
	}

	@Override
	public long getTime() {
		return time;
	}
	
	@Override
	public void setTime( long time ) {
		this.time = time;
	}

	@Override
	public Move simplify() {
		return this;
	}
}
